package com.zhouyu;

import com.zhouyu.service.User;
import org.springframework.beans.propertyeditors.PropertiesEditor;

import java.beans.PropertyEditor;

public class StringToUserPropertyEditor extends PropertiesEditor implements PropertyEditor {

	@Override
	public void setAsText(String text) throws IllegalArgumentException {
		User user = new User();
		user.setName(text);
		setValue(user);
	}
}
